<?php
/**
 * Created by PhpStorm.
 * User: zhang
 * Date: 2015/11/23
 * Time: 15:19
 */
class Curl{
    //窗帘
    private $curtains=array(
        'on'=>'{"address":"2/2/0","datatype":1,"value":"1","type":"text","update":false}',
        'off'=>'{"address":"2/2/0","datatype":1,"value":"0","type":"text","update":false}',
        'stop'=>'{"address":"2/2/1","datatype":1,"value":"1","type":"text","update":false}',
    );
    //画廊
    private $gallery=array(
        'on'=>array(
            '{"address":"2/5/12","datatype":5,"value":"255","type":"text","update":false}',
            '{"address":"2/5/12","datatype":5,"value":"255","type":"text","update":false}',
            '{"address":"2/5/6","datatype":5,"value":"255","type":"text","update":false}',
        ),
        'off'=>array(
            '{"address":"2/5/12","datatype":5,"value":"0","type":"text","update":false}',
            '{"address":"2/5/12","datatype":5,"value":"0","type":"text","update":false}',
            '{"address":"2/5/6","datatype":5,"value":"0","type":"text","update":false}'
        )
    );
    //展厅1
    private $exhibition1=array(
        'on'=>array(
            '{"address":"2/5/0","datatype":5,"value":"255","type":"text","update":false}',
            '{"address":"2/5/1","datatype":5,"value":"255","type":"text","update":false}',
        ),
        'off'=>array(
            '{"address":"2/5/0","datatype":5,"value":"0","type":"text","update":false}',
            '{"address":"2/5/1","datatype":5,"value":"0","type":"text","update":false}',
        ),
    );
    //展示厅2
    private $exhibition2=array(
        'on'=>array(
            '{"address":"2/5/2","datatype":5,"value":"255","type":"text","update":false}',
            '{"address":"2/5/3","datatype":5,"value":"255","type":"text","update":false}',
            '{"address":"2/5/5","datatype":5,"value":"255","type":"text","update":false}',
            '{"address":"2/5/4","datatype":5,"value":"255","type":"text","update":false}',
        ),
        'off'=>array(
            '{"address":"2/5/2","datatype":5,"value":"0","type":"text","update":false}',
            '{"address":"2/5/3","datatype":5,"value":"0","type":"text","update":false}',
            '{"address":"2/5/5","datatype":5,"value":"0","type":"text","update":false}',
            '{"address":"2/5/4","datatype":5,"value":"0","type":"text","update":false}',
        ),
    );
    public function To($typeName,$key){
        return $this->{$typeName}[$key];
    }
}
?>